/**
 * Created by cherry
 */
var Mock = require('mockjs');
var Random = Mock.Random;
Random.image('250x250', '#ffcc33', '#FFF', 'png', '!');
Random.cname();
/*1
 * 用餐人数个数
 *
 * */

Mock.mock('/people/getNumber',{
  "data":{
    "code":1000,
    "msg":"success",
     "data|1-20":[{
       'peo|+1': 0
     }]
  }
}).mock('/order/getRecommend',{
  "data": {
    "code": 1000,
    "msg": "success",
    "data": [{
        "title":"店家推荐",
        "list|4":[{
        "menuName":"鱼头诱惑",
         "price|8-60.2": 8,
          "id":/\w\d{5,10}/,
         "isSign|0-1":0,
          "paragraph|50-100":"@cparagraph",
          "sprite|0-5":0,
          "star|0-5":0
      }]
    }]
  }
}).mock('/order/getMenuList',{
  "data": {
    "code": 1000,
    "msg": "success",
    "data|5": [{
      "title|0-4":0,
      "list|3":[{
        "menuName":"@ctitle",
        "price|8-60.2": 8,
        "isSign|0-1":0,
        "sprite|0-5":0,
        "id":/\w\d{5,10}/,
        "paragraph|50-100":"@cparagraph",
        "isNew|0-1":0
      }]
    }]
  }
}).mock('/shopindex/getPromation',{
  "data": {
    "code": 1000,
    "msg": "success",
    "data|2": [{
      "menuName":"@ctitle",
      "price|8-60.2": 8,
      "sprite|0-5":0,
      "star|0-5":0
    }]
  }
}).mock('/shopindex/getMark',{
  "data": {
    "code": 1000,
    "msg": "success",
    "data|5": [{
      "markName":"@ctitle"

    }]
  }
}).mock('/shopindex/getEvalutate',{
  "data": {
    "code": 1000,
    "msg": "success",

    "data": {
      "score|10-100":50,
      "evalLength":15,
      "isDelicious|1-5.1":1,
      "isQuicky|1-5.1":1,
      "isQuiet|1-5.1":1,
      "list|15":[{
          "nickName":"@cname",
          "isGood|0-1":0,
          "paragraph":"@cparagraph",
          "header":"@image()",
          "datetime":"@datetime('yyyy-MM-dd  HH:mm:ss')"

      }]


    }
  }
})//店铺首页
  .mock(
  '/index/getImgList',
  {
    "data":{
      "code":"1000",
      "msg":"success",
      "data|3-6":[
        {
          img:'@image',
          imgUrl:'/'
        }
      ]
    }
  }
).mock('/ordered/orderedList',{
    "data": {
      "code": "1000",
      "msg": "success",
      "data": {
          "deskNumber":/[A-Z]\d{2}/,
          "orderTime":"@time",
          "people|1-20":1,
           "prePay|8-50":8,
           "header":"@image()",
           "nickName":"@cname",
           "remarkable":"@ctitle",
           "listNumber":5,
            "listed|5":[{
              "diskName":"@cname",
              "counted":1,
              "prices|8-100": 8
           }]


      }
    }
  }).mock('/cart/cartList',{
    "data": {
      "code": "1000",
      "msg": "success",
      "data|3": [{
        "titles|0-2":0,
        "listed|1-5":[{
          "menuName":"@ctitle",
          "price|8-60": 8,
          "imgSrc":"@image()",
          "count":1,
          "isSign|0-1":0,
          "sprite|0-5":0,
          "id":/\w\d{5,10}/,
          "isNew|0-1":0
        }]
      }]
    }
  }).mock('/cart/usuallyList',{
    "data": {
      "code": "1000",
      "msg": "success",
      "data|3": [{
          "listed|4":[{
            "menuName":"@ctitle",
            "imgSrc":"@image()",
            "id":/\w\d{5,10}/
          }]
      }]
    }

  })

export default Mock;
